//package net.laoyeye.yyblog.web.admin;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//import net.laoyeye.yyblog.common.DataGridResult;
//import net.laoyeye.yyblog.common.YYBlogResult;
//import net.laoyeye.yyblog.model.TPlan;
//import net.laoyeye.yyblog.model.query.BaseQuery;
//import net.laoyeye.yyblog.service.KeywordService;
//import net.laoyeye.yyblog.service.TPlanService;
//
//@Controller
//@RequestMapping("/management/plan")
//public class TPlanController {
//    @Autowired
//    private TPlanService tPlanService;
//    
//    @GetMapping
//    public String index() {
//        return "management/plan";
//    }
//
//    @GetMapping("/list")
//    @ResponseBody
//    public DataGridResult listKeyword(BaseQuery query) {
//        DataGridResult result = tPlanService.listPage(query);
//        return result;
//    }
//    
//    @PostMapping("/add")
//    @ResponseBody
//    public YYBlogResult add(TPlan plan) {
//        tPlanService.insertSelective(plan);
//        return YYBlogResult.ok();
//    }
//    
//    @PostMapping("/delete")
//    @ResponseBody
//    public YYBlogResult delete(long id) {
//
//         tPlanService.deleteByPrimaryKey((int) id);
//         return YYBlogResult.ok();
//    }
//    
//    @PostMapping("/edit/enable")
//    @ResponseBody
//    public YYBlogResult editEnable(TPlan plan) {
//
//    	tPlanService.updateByPrimaryKeySelective(plan);
//        return YYBlogResult.ok();
//    }
//
//    @PostMapping("/edit/plan")
//    @ResponseBody
//    public YYBlogResult edit(TPlan plan) {
//    	tPlanService.updateByPrimaryKeySelective(plan);
//        return YYBlogResult.ok();
//    }
//
//}
